<template>
  <div class="index">
    <!-- 轮播 -->
    <Swipers :banner='banner'></Swipers>
    <!-- 标题 -->
    <Title></Title>
    <!-- 资源讲师 -->
    <Teacher :teachers='teachers'></Teacher>
  
  </div>
</template>

<script>
import {banners,tearchs} from '../../src/Request/http.js'
import Swipers from '../../src/components/Index/Sweiper'
import Title from '../../src/components/Index/Title'
import Teacher from '../../src/components/Index/Teacher'
export default {
  name: 'EverydayIndex',
components:{Swipers,Title,Teacher},
  data() {
    return {
      banner:[],//轮播
      teachers:[], //讲师
    };
  },

  mounted() {
    this.shuju()
  },

  methods: {
    shuju(){
      // 轮播
      banners().then((res)=>{
        this.banner=res
      }) 
      // 讲师
      tearchs().then(res1=>{
     this.teachers=res1
     console.log(this.teachers);
      })
    }
  },
};
</script>

<style lang="scss" scoped>

</style>